package com.gz.droolsrule.service;

import com.gz.droolsrule.dao.BaseRuleEntityItemInfoMapper;
import com.gz.droolsrule.pojo.BaseRuleEntityItemInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ClassName: RuleEntityItemService <br/>
 * Description: <br/>
 * date: 2019/5/31 15:59<br/>
 *
 * @author gz<br />
 * @since JDK 1.8
 */
@Service
public class RuleEntityItemService {
    @Autowired
    private BaseRuleEntityItemInfoMapper baseRuleEntityItemInfoMapper;

    /**
     * 方法说明: 根据实体id获取规则引擎实体属性信息
     *
     * @param baseRuleEntityItemInfo 参数
     */
    public List<BaseRuleEntityItemInfo> findBaseRuleEntityItemInfoList(BaseRuleEntityItemInfo baseRuleEntityItemInfo) {
        return this.baseRuleEntityItemInfoMapper.findBaseRuleEntityItemInfoList(baseRuleEntityItemInfo);
    }

    /**
     * 方法说明: 根据id获取对应的属性信息
     *
     * @param id 属性Id
     */
    public BaseRuleEntityItemInfo findBaseRuleEntityItemInfoById(Long id) {
        if (null == id) {
            return null;
        }
        return this.baseRuleEntityItemInfoMapper.findBaseRuleEntityItemInfoById(id);
    }
}
